<%@ page import="br.edu.ufam.avaliacao.Avaliacao" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
    </head>
    <body>        
       <div class="body" style="width: 1000px">
           <h1>RANKING GERAL DE CURSOS - UFAM</h1>
           <br>
            <g:if test="${flash.message}">
                <div class="message">${flash.message}</div>
            </g:if>
            
            <div id="me" class="list">
              <table id="tab" class="tabelas" border="0" cellpadding="5" cellspacing="1" >
                <thead>
                    <tr bgcolor="#E1BFCD">                
                        <th>Curso</th>
                        <th>Data</th>
                        <th>Conceito Final</th>
                        <th>Conceito Final (em decimal)</th>
                        <th>Dimensao 1</th>
                        <th>Dimensao 2</th>
                        <th>Dimensao 3</th>
                        <th>Exibir</th>
                        
                    </tr>
                </thead>
                <tbody>
                <g:each in="${rankingInstanceList}" status="i" var="ranking">
                    <tr class="divisoes">
                        <td class="divisoes" align="center"><g:link action="show" controller="avaliacao" id="${ranking.id}">${fieldValue(bean:ranking, field:'curso.nomeCursoDiploma')}</g:link></td>
                        <td class="divisoes" align="center">${ranking.dateCreated.format("dd/MM/yyyy")}</td>
                        <td class="divisoes" align="center">${fieldValue(bean:ranking, field:'conceitoFinal')}</td>
                        <td class="divisoes" align="center">${fieldValue(bean:ranking, field:'conceitoFinalDec')}</td>
                        <td class="divisoes" align="center">${fieldValue(bean:ranking, field:'conceitoDimensao1')}</td>
                        <td class="divisoes" align="center">${fieldValue(bean:ranking, field:'conceitoDimensao2')}</td>
                        <td class="divisoes" align="center">${fieldValue(bean:ranking, field:'conceitoDimensao3')}</td>
                        <td class="divisoes" align="center"><g:link action="show" controller="avaliacao" id="${ranking.id}"><img src="../images/skin/show.gif" border="0" alt="Exibir" title="Exibir"></g:link></td>
                        
                    </tr>
                </g:each>
                </tbody>
            </table>    
        </div>
        <div class="paginateButtons">
            <g:paginate total="${rankingTotal}" next="Próximo" prev="Anterior" />
        </div>
       </div>
    </body>
</html>